.class public Lcom/glympse/android/glympsewidget/GlympseWidget;
.super Landroid/appwidget/AppWidgetProvider;
.source "GlympseWidget.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 24
    invoke-direct {p0}, Landroid/appwidget/AppWidgetProvider;-><init>()V

    return-void
.end method


# virtual methods
.method public onUpdate(Landroid/content/Context;Landroid/appwidget/AppWidgetManager;[I)V
    .locals 11
    .parameter "oContext"
    .parameter "oAppWidgetManager"
    .parameter "aAppWidgetIds"

    .prologue
    const/4 v10, 0x0

    .line 29
    array-length v5, p3

    move v6, v10

    :goto_0
    if-lt v6, v5, :cond_0

    .line 49
    return-void

    .line 29
    :cond_0
    aget v0, p3, v6

    .line 32
    .local v0, nAppWidgetId:I
    new-instance v4, Landroid/widget/RemoteViews;

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v7

    const/high16 v8, 0x7f03

    invoke-direct {v4, v7, v8}, Landroid/widget/RemoteViews;-><init>(Ljava/lang/String;I)V

    .line 35
    .local v4, oRemoteViews:Landroid/widget/RemoteViews;
    new-instance v3, Landroid/content/Intent;

    const-string v7, "android.intent.action.VIEW"

    const-string v8, "glympse:screen=send"

    invoke-static {v8}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v8

    const-class v9, Lcom/glympse/android/glympse/Glympse;

    invoke-direct {v3, v7, v8, p1, v9}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;Landroid/content/Context;Ljava/lang/Class;)V

    .line 36
    .local v3, oIntentSend:Landroid/content/Intent;
    const/high16 v7, 0x7f0c

    invoke-static {p1, v10, v3, v10}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Landroid/widget/RemoteViews;->setOnClickPendingIntent(ILandroid/app/PendingIntent;)V

    .line 39
    new-instance v2, Landroid/content/Intent;

    const-string v7, "android.intent.action.VIEW"

    const-string v8, "glympse:screen=history"

    invoke-static {v8}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v8

    const-class v9, Lcom/glympse/android/glympse/Glympse;

    invoke-direct {v2, v7, v8, p1, v9}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;Landroid/content/Context;Ljava/lang/Class;)V

    .line 40
    .local v2, oIntentHistory:Landroid/content/Intent;
    const v7, 0x7f0c0001

    invoke-static {p1, v10, v2, v10}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Landroid/widget/RemoteViews;->setOnClickPendingIntent(ILandroid/app/PendingIntent;)V

    .line 43
    new-instance v1, Landroid/content/Intent;

    const-string v7, "android.intent.action.VIEW"

    const-string v8, "glympse:screen=favorites"

    invoke-static {v8}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v8

    const-class v9, Lcom/glympse/android/glympse/Glympse;

    invoke-direct {v1, v7, v8, p1, v9}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;Landroid/content/Context;Ljava/lang/Class;)V

    .line 44
    .local v1, oIntentFavorites:Landroid/content/Intent;
    const v7, 0x7f0c0002

    invoke-static {p1, v10, v1, v10}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;

    move-result-object v8

    invoke-virtual {v4, v7, v8}, Landroid/widget/RemoteViews;->setOnClickPendingIntent(ILandroid/app/PendingIntent;)V

    .line 47
    invoke-virtual {p2, v0, v4}, Landroid/appwidget/AppWidgetManager;->updateAppWidget(ILandroid/widget/RemoteViews;)V

    .line 29
    add-int/lit8 v6, v6, 0x1

    goto :goto_0
.end method
